function Shape() {
}
Shape.prototype.name =	this.name = 'Shape';
Shape.prototype.toString =	this.toString = function (){
		return this.name;
	};

function TwoDShape(){}
TwoDShape.prototype =  Shape.prototype;
TwoDShape.prototype.constructor = TwoDShape;
TwoDShape.prototype.name = '2D shape';

function Triangle(side , height){
	this.side = side;
	this.height = height;
}
Triangle.prototype  = TwoDShape.prototype;
Triangle.prototype.constructor = Triangle;
Triangle.prototype.name = 'Triangle';
Triangle.prototype.getArea = function(){
		return this.side * this.height / 2;
};

var my = new Triangle(5,10);
console.log("my.getArea()");
console.log(my.getArea());